﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    <script>
        for (var i = 4; i >= 0; i--) {
            let star = '';
            for (var k = 0; k < i; k++) {
                star = star + ' ';
            }
            for (var j = 0; j < 4 - i; j++) {
                star = star + '*';
            }
            for (var j = 0; j < 5 - i; j++) {
                star = star + '*';
            }
            console.log(star);
        }
    </script>
</body>
</html>